package com.javaspeak.designpatterns.go4.behavioural.templatemethod;

/**
 * In the Template Method pattern a class such as this one extends the abstract
 * class and provides implementation for the abstract methods.  In the the
 * abstract class it is extending there is a method ( buildPage() ) which calls
 * rhe abstract methods in the correct order.
 *
 * @author John Dickerson
 */
public class HomePage extends AbstractHtmlPage {

    /* (non-Javadoc)
     * @see com.javaspeak.designpatterns.go4.behavioural.templatemethod.
     *      AbstractHtmlPage#getTitle()
     */
    @Override
    public String getTitle() {

        return "My Home Page";
    }


    /* (non-Javadoc)
     * @see com.javaspeak.designpatterns.go4.behavioural.templatemethod.
     *      AbstractHtmlPage#getHeader()
     */
    @Override
    public String getHeader() {

        return "<a href=\"www.google.com\">Google</a>";
    }


    /* (non-Javadoc)
     * @see com.javaspeak.designpatterns.go4.behavioural.templatemethod.
     *      AbstractHtmlPage#getContent()
     */
    @Override
    public String getContent() {

        return "All knowledge can be had from google";
    }


    /* (non-Javadoc)
     * @see com.javaspeak.designpatterns.go4.behavioural.templatemethod.
     *      AbstractHtmlPage#getFooter()
     */
    @Override
    public String getFooter() {

       return "Design Production";
    }

}
